<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Redis;
use App\Http\Services\SendGiftServices;

class OpenRoomForIos extends Command
{
    protected $signature = 'openRoomForIos';

    protected $description = '为了ios审核持续开房间';

    public function __construct()
    {
        parent::__construct();
    }

    public function handle()
    {
//        $keys = Redis::KEYS('*');
//        // 删除所有匹配的键
//        foreach ($keys as $key) {
//            echo $key;
//            echo "\r\n";
//            Redis::DEL($key);
//        }

//        $res = Redis::SET('CONTENT:CHECK:SWITCH', 1);
//        $res = Redis::SET('TRENDS:AUDIT:SWITCH', 1);
//        $res = Redis::SET('GRASSLANDSHEEP:GAME:NUM', 100);
//        $res = Redis::SET('GRASSLANDSHEEP:TRACKPOOL:TOTAL', 3000);
//        Redis::SET('ANGERBIRD:GAME:NUM', 100);
//        Redis::SET('ANGERBIRD:TRACKPOOL:TOTAL', 50000);
//        Redis::SET('FAMILYCOMPETITION:GAME:NUM', 100);
//        Redis::SET('FAMILYCOMPETITION:TRACKPOOL:TOTAL', 50000);
//
        $token = Redis::HGET('CACHE:USER:TOKEN:HASH', 10011);
        echo $token.'  ';
//
//        $service = new SendGiftServices();
//        $service->giftbagbatchHandle(['batchId'=>35301]);

        return true;   
    }

}
